package com.example.consumer.dubbo.web;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.dubbo.service.SomeService;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SomeController {

  // @Reference 相当于 dubbo:reference interface="" cersion="" check=false
  @Reference(interfaceClass = SomeService.class, version = "1.0.0", check = false)
  private SomeService someService;

  @RequestMapping(value = "/hello")
  public Object hello() {
    // 调用远程接口对象
    return someService.hello();
  }
}
